package za.ac.wits.elen7045.persistence.model;

public enum CreditCardType {

	MASTER_CARD	("MAST"),
	VISA		("VISA");
	
	public static CreditCardType getTypeByName(String name) {
		for (CreditCardType type : values()) {
			if (type.getName().equals(name)) {
				return type;
			}
		}
		return null;
	}
	
	private CreditCardType(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
	private String name;
	
}
